<?php

class Statements {
    
    public static function getMenus() {
        
        if($_SESSION['usuario']['nivel'] == '1') {
            
            $admin = "";
            
        } else {
            
            $admin = "AND Admin = 'I'";
            
        }
        
        $sql = "SELECT * FROM menu
                WHERE 1 = 1 
                {$admin}
                AND Modulo = 'index'
                AND Situacao = 'A'";
        
        return Connection::getResult($sql);
        
    }
    
}

?>
